package com.dz.risk.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * @author Doke
 * @date 2020/10/20 15:14
 */
@Configuration
public class SwaggerConfig {

    @Bean
    public Docket createRestApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .groupName("webApi")
                .pathMapping("/")
                .apiInfo(new ApiInfoBuilder()
                        .title("东莞证券风控")
                        .description("本文档描述了服务接口定义")
                        .version("1.0")
                        .build())
                .select()
                .paths(PathSelectors.any())
                .build();
    }
}
